The invention generally relates to a technique for reconstituting a pre-boot firmware environment after launch of an operating system.
A conventional computer system typically enters a boot services mode when the system is powered up. In this boot services mode, the system executes firmware instructions that are stored in a non-volatile, firmware memory of the system. The execution of this firmware permits the computer system to perform basic input and output firmware services that allow the system to initialize system memory, detect system devices, perform a self-test, display a status update to a user, etc. At the conclusion of the boot services mode, the computer system launches an operating system.
After the launch of the operating system, only a limited subset of the firmware services are available though the use of software interrupts (associated with an “INT” instruction) or a callable interface (such as extensible firmware interface (EFI) runtime services). These services may include, for example, services to read and write to a hard disk drive, a service to display information on a monitor, etc. These software interrupts are synchronized to the system clock of the computer system and thus, are “synchronous interrupts”.
In a typical computer system, none of the firmware services mentioned above are available to service asynchronous interrupts. Instead, these interrupts may be serviced by a system management mode (SMM) of the computer system. The purpose of the SMM is to handles certain functions (power management functions, for example) that are hidden from the operating system and applications of the computer system. SMM program code typically is stored in a region of system memory called a system management random access memory (SMRAM). The size of the SMRAM typically is limited. Therefore, due to this size constraint, the SMM typically is a lightweight handler that does some basic state initialization and exits back to the operating system with no other work.
Thus, there is a continuing need for better ways to service interrupts in a computer system.